package com.admin.bean;

import java.util.Date;

import com.admin.service.ProvinceService;
import com.admin.util.BaseUtil;

public class AdminSpBean {

	private int id;
	private String companyname;
	private String spname;	//sp名称
	private String spcodename;	//业务名称
	private String spcode;	//sp端口号
	private String spcommand;//sp指令代码
	private String spprovince;//sp支持省份
	private int spfee;		//代码金额，分为单位
	private String spmt;	//sp下行
	private int spdaylimit;	//日限
	private int spmonthlimit;	//月限
	private String spmemo;		//备注
	private int spstatus;		//sp合作状态
	private int companyid;		//通道所属公司
	private int spisp;			//运营商
	private String shieldcity;	//屏蔽地市
	private String bussiness;	//业务线
	private String spdesc;		//备注
	private Date createdtime;	//创建时间
	
	
	
	
	public String getSpdesc() {
		return spdesc;
	}
	public void setSpdesc(String spdesc) {
		this.spdesc = spdesc;
	}
	public String getBussiness() {
		return bussiness;
	}
	public void setBussiness(String bussiness) {
		this.bussiness = bussiness;
	}
	public String getShieldcity() {
		return shieldcity;
	}
	public void setShieldcity(String shieldcity) {
		this.shieldcity = shieldcity;
	}
	public String getCompanyname() {
		return companyname;
	}
	public void setCompanyname(String companyname) {
		this.companyname = companyname;
	}
	public String getSpcodename() {
		return spcodename;
	}
	public void setSpcodename(String spcodename) {
		this.spcodename = spcodename;
	}
	public int getSpisp() {
		return spisp;
	}
	public void setSpisp(int spisp) {
		this.spisp = spisp;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getSpname() {
		return spname;
	}
	public void setSpname(String spname) {
		this.spname = spname;
	}
	public String getSpcode() {
		return spcode;
	}
	public void setSpcode(String spcode) {
		this.spcode = spcode;
	}
	public String getSpcommand() {
		return spcommand;
	}
	public void setSpcommand(String spcommand) {
		this.spcommand = spcommand;
	}
	public String getSpprovince() {
		return spprovince;
	}
	public void setSpprovince(String spprovince) {
		this.spprovince = spprovince;
	}
	public int getSpfee() {
		return spfee;
	}
	public void setSpfee(int spfee) {
		this.spfee = spfee;
	}
	public String getSpmt() {
		return spmt;
	}
	public void setSpmt(String spmt) {
		this.spmt = spmt;
	}
	public int getSpdaylimit() {
		return spdaylimit;
	}
	public void setSpdaylimit(int spdaylimit) {
		this.spdaylimit = spdaylimit;
	}
	public int getSpmonthlimit() {
		return spmonthlimit;
	}
	public void setSpmonthlimit(int spmonthlimit) {
		this.spmonthlimit = spmonthlimit;
	}
	public String getSpmemo() {
		return spmemo;
	}
	public void setSpmemo(String spmemo) {
		this.spmemo = spmemo;
	}
	public int getSpstatus() {
		return spstatus;
	}
	public void setSpstatus(int spstatus) {
		this.spstatus = spstatus;
	}
	public int getCompanyid() {
		return companyid;
	}
	public void setCompanyid(int companyid) {
		this.companyid = companyid;
	}
	public Date getCreatedtime() {
		return createdtime;
	}
	public void setCreatedtime(Date createdtime) {
		this.createdtime = createdtime;
	}
	
	public String getProvince(){
		String[] provinces = this.spprovince.split(",");
		
		StringBuilder sb = new StringBuilder();
		for (String string : provinces) {
			int provinceId = BaseUtil.stringToInt(string);
			sb.append(ProvinceService.getProvince(provinceId).getProvince());
			sb.append(";");
		}
		
		
		return sb.toString();
	}
	
	
}
